#include <cstdio>
#include <string>

using namespace std;

class Date
{
	public:
		int  year;
		int  month;
		int  day;

		Date(int _year=1970, int _month=1, int _day=1)
		{
			Assign(_year, _month, _day);
		}

		void Assign(int _year, int _month, int _day)
		{
			year = _year;
			month = _month;
			day = _day;
		}
};

class Staff
{
	public:
		string  name;
		string  sex;
		Date    birthday;
		string  phone;

		Staff(string _name, string _sex, Date _birthday, string _phone)
		{
			name = _name;
			sex = _sex;
			birthday = _birthday;
			phone = _phone;
		}

		void info()
		{
			printf("Name: %s\n", name.c_str());
			printf("Sex: %s\n", sex.c_str());
			printf("Birthday: %04d-%02d-%02d\n", birthday.year, birthday.month, birthday.day);
			printf("Phone: %s\n", phone.c_str());
		}

		void show()
		{
			printf("<Staff> ---------------------\n");
			info();
			printf("\n");
		}
};

class Teacher: virtual public Staff
{
	public:
		string  subject;

		Teacher(Staff _staff, string _subject): Staff(_staff)
		{
			subject = _subject;
		}

		void info()
		{
			printf("Subject: %s\n", subject.c_str());
		}

		void show()
		{
			printf("<Teacher> -------------------\n");
			Staff::info();
			info();
			printf("\n");
		}
};

class Leader: virtual public Staff
{
	public:
		string department;

		Leader(Staff _staff, string _department): Staff(_staff)
		{
			department = _department;
		}

		void info()
		{
			printf("Department: %s\n", department.c_str());
		}

		void show()
		{
			printf("<Leader> --------------------\n");
			Staff::info();
			info();
			printf("\n");
		}
};

class DbTeacher: public Teacher, public Leader
{
	public:
		int  salary;

		DbTeacher(Teacher _teacher, Leader _leader, int _salary): Staff(_teacher), Teacher(_teacher), Leader(_leader)
		{
			salary = _salary;
		}

		void info()
		{
			printf("Salary: %d (yuan per month)\n", salary);
		}

		void show()
		{
			printf("<DbTeacher> -----------------\n");
			Staff::info();
			Teacher::info();
			Leader::info();
			info();
			printf("\n");
		}
};

int main()
{
	Staff small("Monkeyhbd", "Male", Date(2003, 8, 22), "1808080808");
	small.show();

	Teacher middle(small, "Object Oriented Programming");
	middle.show();

	Leader officer(small, "Computer Science and Technology");
	officer.show();

	DbTeacher big(middle, officer, 1000000);
	big.show();

	return 0;
}
